package cn.liyao.web.repository;

import cn.liyao.web.model.Friend;
import cn.liyao.web.model.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FriendRepository extends JpaRepository<Friend, String> {


   List<Friend> findAllByUserIdAndState(String userId, int state);

   Friend findFirstByUserIdAndFriendIdAndState(String userid, String friendId, Integer state);


   Friend findFirstByUserIdAndFriendId(String userId, String friendId);
}